import time
from selenium import webdriver


def click_bind_button(button_name: "全部"):
    """
    根据输入的按钮名称，点击是否绑定wegame/taptap相应的按钮。

    参数:
    button_name (str): 可选值为 "全部", "是", "否"
    """
    if button_name == "全部":
        button = driver.find_element(By.XPATH, "//div[text()='全部']")
    elif button_name == "是":
        button = driver.find_element(By.XPATH, "//div[text()='是']")
    elif button_name == "否":
        button = driver.find_element(By.XPATH, "//div[text()='否']")
    else:
        print("无效的按钮名称!")
        return

    button.click()  # 点击找到的按钮
    print(f"成功点击 '{button_name}' 按钮")


driver = webdriver.Chrome("./chromedriver-win64/chromedriver.exe")
url = "https://www.pxb7.com/buy/10302/1?keyword=&searchType=%E8%87%AA%E7%84%B6%E6%90%9C%E7%B4%A2"
driver.get(url)  # 不需要验证用户就可以查找
driver.maximize_window()

time.sleep(1000)
